home *** CD-ROM | disk | FTP | other *** search
/ Sprite 1984 - 1993 / Sprite 1984 - 1993.iso / src / machserver / 1.098 / include / sys / mman.h < prev    next >
C/C++ Source or Header  |  1991-04-09  |  1KB  |  40 lines

  1. /*
  2.  * Copyright (c) 1991 Regents of the University of California.
  3.  * All rights reserved.  The Berkeley software License Agreement
  4.  * specifies the terms and conditions for redistribution.
  5.  *
  6.  */
  7.  
  8. #ifndef _MMAN
  9. #define _MMAN
  10.  
  11. /*
  12.  * Protection flags.
  13.  */
  14. #define PROT_READ    0x4    /* Read permissions. */
  15. #define PROT_WRITE    0x2    /* Write permissions. */
  16. #define PROT_EXEC    0x1    /* Exec permissions. */
  17. /*
  18.  * For no good reason, Sun and Sequent have the flags in the reverse order.
  19.  */
  20. #define SUN_PROT_READ    0x1    /* Read permissions. */
  21. #define SUN_PROT_WRITE    0x2    /* Write permissions. */
  22. #define SUN_PROT_EXEC    0x4    /* Exec permissions. */
  23.  
  24. #define PROT_RDWR    (PROT_READ|PROT_WRITE)
  25. #define PROT_BITS    (PROT_READ|PROT_WRITE|PROT_EXEC)
  26.  
  27. /*
  28.  * Sharing flags.
  29.  */
  30. #define MAP_SHARED    1    /* Share modifications. */
  31. #define MAP_PRIVATE    2    /* Keep modifications private. */
  32. #define MAP_ZEROFILL    3    /* Zerofill pages. */
  33. #define MAP_TYPE    0xf    /* Mask for type. */
  34.  
  35. #define MAP_FIXED    0x10    /* Force mapping to user's address. */
  36.  
  37. #define _MAP_NEW    0x80000000 /* Return address instead of 0. */
  38.  
  39. #endif _MMAN
  40.